'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview vip等级
 * @author by:vincentxiaoxu
 */

var moment = require('moment');
var modelUtil = require('../util/modelUtil');
var constantUtil = require('../util/constantUtil');
var mongoConnector = require('../libs/mongodb/mongoConnector');
/* jshint unused:false */
var miracleSchema = require('../schemas/build/miracleSchema.js');
var Miracle = mongoConnector().model('Miracle');

/**
 * 根据role_id获取model
 * @return {[type]} [description]
 */
module.exports.getByRoleId = function (role_id, cb) {
    modelUtil.getByRoleId(Miracle, role_id, function (err, miracle_model) {
        if (!!err) {
            console.error(err);
            return cb(err);
        }
        cb(null, miracle_model);
    });
};
